import { axios } from '@/utils/request'

const api = {
  message: '/shifts/message'
}

export function getMessageList (parameter) {
  return axios({
    url: api.message + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveMessage (parameter) {
  return axios({
    url: api.message + (parameter.messageId > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delMessage (parameter) {
  return axios({
    url: api.message + '/remove',
    method: 'post',
    params: parameter
  })
}

export const messageExport = api.message + '/export'
